﻿using Coldairarrow.Entity.PB;
using Coldairarrow.Util;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.PB
{
    public partial interface IPB_CustomerBusiness
    {
        Task<PageResult<PB_Customer>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<PB_Customer> GetTheDataAsync(string id);
        Task AddDataAsync(PB_Customer data);
        Task UpdateDataAsync(PB_Customer data);
        Task DeleteDataAsync(List<string> ids);
        Task AddDataExlAsync(List<PB_Customer> list);
        Task UpdateState(string id);
        Task UpdataStatefalse(string   id);

        /// <summary>
        /// 客户发货统计
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<CustomerDeliverDTO> GetCustomerDeliverListAsync(CustomerDeliverConditionDTO input);

        /// <summary>
        /// 客户发货统计导出
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<CustomerDeliverDetailDTO>> GetCustomerDeliverExcelAsync(CustomerDeliverConditionDTO input);
    }

    #region   客户发货统计

    /// <summary>
    /// 客户发货统计（分页）
    /// </summary>
    public class CustomerDeliverDTO
    {

        /// <summary>
        /// 总条数
        /// </summary>
        public int? Count { get; set; }

        /// <summary>
        /// 客户发货统计(明细)
        /// </summary>
        public List<CustomerDeliverDetailDTO> CustomerDeliverDetail { get; set; }
    }

    /// <summary>
    /// 客户发货统计（明细）
    /// </summary>
    public class CustomerDeliverDetailDTO
    {
        /// <summary>
        /// 序号
        /// </summary>
        public int? Rnumber { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string Spec { get; set; }

        /// <summary>
        /// 单个理论重量
        /// </summary>
        public double? Weight { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public double? OutNum { get; set; }

        /// <summary>
        /// 总重量
        /// </summary>
        public double? Weights { get; set; }

    }

    /// <summary>
    /// 客户发货统计（搜索条件）
    /// </summary>
    public class CustomerDeliverConditionDTO
    {
        /// <summary>
        /// 起始日期
        /// </summary>
        public string StartDate { get; set; }

        /// <summary>
        /// 结束日期
        /// </summary>
        public string EndDate { get; set; }

        /// <summary>
        /// 筛选条件
        /// </summary>
        public string Keyword { get; set; }

        /// <summary>
        /// 购销单位
        /// </summary>
        public string SaleUnitName { get; set; }

        /// <summary>
        /// 当前页
        /// </summary>
        public int pageIndex { get; set; }

        /// <summary>
        /// 每页条数
        /// </summary>
        public int pageRows { get; set; }

    }

    #endregion

}